<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Test</title>
	<script>
		window.onload = function () {
			let el = console.log;
			let dl = console.dir;

			var h2 = document.querySelectorAll('h2')
			// el(h2)

			dl(Array)
			// el( Array.prototype.filter.name)  f filter? 不需要加括号么?
			var btns = Array.prototype.filter.call(h2, item => {
				return item.dataset.call == 'time';
			})
			el(btns)
		}
	</script>
</head>

<body>
	<!-- 只要显示h2标签内容即可 -->
	<h2 data-call="call">call</h2>
	<h2 data-call="time">time</h2>
	<h2 data-call="phone">phone</h2>
</body>

</html>